package com.sinai.mshab.client.formatting;

import com.sinai.mshab.client.widgets.FormatPanel;

/**
 * Contains a list of defaults to be used in a {@link FormatPanel}. This list
 * is passed down to {@link Container}s which do the real formatting.
 * 
 * @author serge
 * 
 */
public class FormatPanelDefaults {
	// the default direction.
	private Direction defaultLabelPosition = Direction.LEFT;

	// the default direction.
	private int defaultLeftLabelWidth = 150;

	/* Boring setters and getters below */

	public void setLeftLabelWidth(int defaultLeftLabelWidth) {
		this.defaultLeftLabelWidth = defaultLeftLabelWidth;
	}

	/**
	 * Returns default the width of the left labels in this panel.
	 * 
	 * @return the default width of the left labels in this panel.
	 */
	public int getLeftLabelWidth() {
		return defaultLeftLabelWidth;
	}

	/**
	 * Sets the default label direction. Use LEFT or TOP. If you need other
	 * directions, use {@link FormatPanel}'s addDecoration() instead.
	 * 
	 * @param defaultLabelPosition
	 */
	public void setLabelPosition(Direction defaultLabelPosition) {
		this.defaultLabelPosition = defaultLabelPosition;
	}

	/**
	 * Returns the default label position of widgets being added to this panel.
	 * 
	 * @return the default label position of widgets being added to this panel.
	 */
	public Direction getLabelPosition() {
		return defaultLabelPosition;
	}
}
